import re
import time

from until.tranlate import tranlate

file = open('Words.txt', 'r', encoding='utf-8')
out = open('out1.txt', 'a', encoding='utf-8')
result = file.readlines()
for i in range(len(result)):
    # time.sleep(1)
    result[i] = result[i].replace('\n', '').strip()

    # if len(result[i]) > 0 and i >= 2811:
    #     pattern = re.compile('\d+')
    #     means = tranlate(result[i])
    # else:
    #     continue

    if result[i].startswith(' '):
        new_words = result[i - 1].strip() + '；' + result[i].strip()
        # out.write(new_words + '\t' + means + '\n')
        # print(i, new_words, means)
        print(new_words)
    else:
        # print(i, result[i], means)
        print(result[i])
        # out.write(result[i] + '\t' + means + '\n')

        # print(result[i])
